<include file="application/walletyhbbadmin/view/public/left.html"/>
<div id="dcMain">
    <!-- 当前位置 -->
    <div id="urHere">管理中心<b>></b><strong>友情链接管理</strong> </div>
    <div class="mainBox" style="height:auto!important;height:550px;min-height:550px;">
        <h3><a href="{:U('Link/addLink')}" class="actionBtn add">添加友情链接</a>友情链接管理</h3>
        <form action="{:U('Link/index')}" method="post">
            &nbsp;友情链接名称: &nbsp;<input class="inpMain" placeholder="友情链接名称" name="link_name" value=""  type="text">
            <input name="submit" class="btnGray" type="submit" value="搜索" />
        </form>
        <br>
        <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
            <tr>
                <th align="center">ID</th>
                <th align="center">友情链接名称</th>
                <th align="center">友情链接图片</th>
                <th align="center">友情链接链接</th>
                <th align="center">添加时间</th>
                <th align="center">状态</th>
                <th align="center">操作</th>
            </tr>
            <volist name="link" id="vs" empty="$empty">
                <tr>
                    <td align="center">{$vs.link_id}</td>
                    <td align="center">{$vs.link_name}</td>
                    <td align="center"><img src="{$vs.link_logo}" width="100px"/></td>
                    <td align="center">{$vs.link_url}</td>
                    <td align="center">{$vs.link_time|date="Y-m-d H:i:s",###}</td>
                    <td align="center">
                        <eq name="vs.is_show" value="1">使用
                            <span style="background-color:#0066ff;border-radius:8px">&nbsp;<a href="{:U('Link/updateStatus',array('link_id'=>$vs.link_id))}" style="color:#fff">关闭</a>&nbsp;</span>
                        </eq>
                        <eq name="vs.is_show" value="0">关闭
                            <span style="background-color:#0066ff;border-radius:8px">&nbsp;<a href="{:U('Link/updateStatus',array('link_id'=>$vs.link_id))}" style="color:#fff">使用</a>&nbsp;</span>
                        </eq>
                    </td>
                    <td align="center">
                        <a href="JavaScript:void(0);" onclick="gg_del({$vs.link_id})" class="del" did="{$vs.link_id}">删除</a>&nbsp;&nbsp;<a class="link-update" href="{:U('Link/edit',array('link_id'=>$vs['link_id']))}">修改</a>
                    </td>
                </tr>
            </volist>
        </table>
    </div>
    <div><center>{$page}</center></div>
</div>
<div class="clear"></div>
<include file="application/walletyhbbadmin/view/public/foot.html"/><!-- dcFooter 结束 -->
<div class="clear"></div>
<script>
    function gg_del(id){
        layer.confirm('是否确认删除?',function(){
            $.post("{:U('Link/delLink')}",{link_id:id},function(data){
                layer.msg(data.info);
                if(data.status==1){
                    setTimeout(function(){
                        window.location.reload();
                    },1000)
                }
            })
        })
    }
</script>

</body>
</html>